package ynu.edu.achitectureclass.repository;


import org.springframework.data.jpa.repository.JpaRepository;
import ynu.edu.achitectureclass.entity.Device;

import java.util.List;
import java.util.Optional;

public interface DeviceRepository extends JpaRepository<Device, Long> {
    Optional<Device> findBySerialNumber(String serialNumber);
    Device findByType(String type);

    List<Device> findDevicesByType(String tempSensor);
}